#字符串相关小练习
#1.用变量表示一个人的名字，并向其显示一条消息
name = "jack"
message = f"hello {name},how are you?"
print(message)

#2.用变量表示一个人的名字，分别以全大写，全小写，首字母大写的方式表示这个人名字
print(name.title())#首字母大写
print(name.upper())#全大写
print(name.lower())#全小写

#3.输出一句名人名言
print('Charles Oliveira said,"Life has taught me that I am useless, but look at the present, I am the UFC World Champion!"')

#4.使用变量表示人名，将要显示的消息赋值给text，打印输出
Name = "Charles Oliveira"
text = f'{Name} said,"Life has taught me that I am useless, but look at the present, I am the UFC World Champion!"'
print(text)

#5.用变量表示人名，删除人名的空白
Name1 = "  \t  peter  \n"
print(Name1.lstrip())
print(Name1.rstrip())
print(Name1.strip())